from collections.abc import Iterable, Iterator

dic=[1,2,3,4]
print(isinstance(dic,Iterable))
print(isinstance(dic,Iterator))
dic2=iter(dic)
print(isinstance(dic2,Iterator))
# print(next(dic2))
# print(dic2.__next__())
# 查看内置函数
print(dir(dic2))
# 获取迭代器的内部长度
print(dic2.__length_hint__())
# 设置迭代器的起始位置
print(dic2.__setstate__(1))
print(dic2.__next__())
